package com.ruoyi.association.service.impl;

import com.ruoyi.association.domain.CustomerCollectEmployee;
import com.ruoyi.association.mapper.CustomerCollectEmployeeMapper;
import com.ruoyi.association.service.ICustomerCollectEmployeeService;
import com.ruoyi.dynamic.domain.Dynamic;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 评价订单 业务层处理
 * 
 * @author ruoyi
 */
@Service
public class CustomerCollectEmployeeServiceImpl implements ICustomerCollectEmployeeService
{
    private static final Logger log = LoggerFactory.getLogger(CustomerCollectEmployeeServiceImpl.class);

    @Autowired
    private CustomerCollectEmployeeMapper customerCollectEmployeeMapper;

    /**
     * 根据条件分页查询关联列表
     *
     * @param customerCollectEmployee 关联信息
     * @return 关联信息集合信息
     */
    @Override
    public List<CustomerCollectEmployee> selectCustomerCollectEmployeeList(CustomerCollectEmployee customerCollectEmployee)
    {
        return customerCollectEmployeeMapper.selectCustomerCollectEmployeeList(customerCollectEmployee);
    }

    /**
     * 根据条件分页查询关联列表
     *
     * @param customerId 关联信息
     * @return 关联信息集合信息
     */
    @Override
    public List<Dynamic> selectCustomerCollectEmployeeDynamicList(Long customerId)
    {
        return customerCollectEmployeeMapper.selectCustomerCollectEmployeeDynamicList(customerId);
    }

    // 查询数量
    public int countCustomerEmployeeByCustomerId(Long customerId) {
        return customerCollectEmployeeMapper.countCustomerEmployeeByCustomerId(customerId);
    }

    // 查询数量
    public int countCustomerEmployeeByEmployeeId(Long employeeId) {
        return customerCollectEmployeeMapper.countCustomerEmployeeByEmployeeId(employeeId);
    }

    // 查询数量
    public int countCustomerEmployeeById(Long customerId, Long employeeId) {
        return customerCollectEmployeeMapper.countCustomerEmployeeById(customerId, employeeId);
    }

    // 单个删除
    public int deleteCustomerEmployeeById(Long customerId, Long employeeId) {
        return customerCollectEmployeeMapper.deleteCustomerEmployeeById(customerId, employeeId);
    }

    // 批量删除
    public int deleteCustomerEmployee(Long[] customerIds){
        return  customerCollectEmployeeMapper.deleteCustomerEmployee(customerIds);
    }

    // 批量新增
    public int batchCustomerEmployee(List<CustomerCollectEmployee> customerEmployeeList){
        return  customerCollectEmployeeMapper.batchCustomerEmployee(customerEmployeeList);
    }

}
